<?php

use yii\helpers\Html;
use yii\grid\GridView;
use backend\models\GerentModel;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\GerentSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '管理员列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="gerent-index table-responsive">
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('创建管理员', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            'id',
            'username',
            'email:email',
            ['label' => '状态', 'attribute' => 'status', 'filter' => GerentModel::$statusDesc, 'value' => 'statusStr'],
            'created_at:datetime',
            'updated_at:datetime',
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
